From c2b9a12f6f47db6c692c952b274fd13a8bf0398b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 20 May 2019 13:19:12 +0000 Subject: [PATCH] surface: Don't dispose the frame clock prematurely Since we are now sharing frame clocks with multiple surfaces, we can no longer dispose them unconditionally when a surface goes away. Only do it if we are a toplevel (without parent). This was showing up as criticals on exit when opening and closing any popover in widget factory. --- gdk/gdksurface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index ee337c8a2e..94de885ef2 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -899,7 +899,8 @@ _gdk_surface_destroy_hierarchy (GdkSurface *surface, if (surface->frame_clock) { - g_object_run_dispose (G_OBJECT (surface->frame_clock)); + if (surface->parent == NULL) + g_object_run_dispose (G_OBJECT (surface->frame_clock)); gdk_surface_set_frame_clock (surface, NULL); } -- 2.30.2